package com.leimo.demo.jdbc;

import com.leimo.demo.jdbc.model.User;
import com.leimo.demo.jdbc.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SqlIteTest {

  public static void main(String[] args) throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
        "classpath:spring/spring-jdbc.xml");
    UserService userService = context.getBean(UserService.class);
//    userService.createSQL();
    User user = new User();
    //Bean的名称
//    org.springframework.transaction.config.internalTransactionAdvisor
    user.setName("admin4");
    user.setUid(1);
    userService.addUser2(user);
  }
}
